using System;
using System.Collections.Generic;
using System.Text;
using AF_ORM.CORE;
using System.Data;
using System.Configuration;
using QuanLyThietBi.Config;     
using QuanLyThietBi.Entity;
namespace QuanLyThietBi.ManagerBase
{
                

     public abstract class TBL_TrangThaiThietBiManagerBase
    {
        public TBL_TrangThaiThietBiManagerBase()
        {
            Adapter.ConnectionString =  ConnectionConfig.ConnectionString;            
        }
                    
 
        /// <summary>
        /// Them moi du lieu
        /// </summary>
        /// <returns>TBL_TrangThaiThietBiEntity</returns>
        public TBL_TrangThaiThietBiEntity Insert(TBL_TrangThaiThietBiEntity obj)
        { 
            return (TBL_TrangThaiThietBiEntity) Adapter.Insert(obj);             
        }
 
 
        /// <summary>
        /// Update du lieu theo khoa chinh cua object
        /// </summary>
        /// <returns>TBL_TrangThaiThietBiEntity</returns>
        public TBL_TrangThaiThietBiEntity Update(TBL_TrangThaiThietBiEntity obj)
        { 
            return (TBL_TrangThaiThietBiEntity)Adapter.Update(obj);             
        }
 
 
        /// <summary>
        /// Update du lieu theo dieu kien trong object
        /// </summary>
        /// <returns>TBL_TrangThaiThietBiEntity</returns>
        public TBL_TrangThaiThietBiEntity UpdateWithCondition(TBL_TrangThaiThietBiEntity obj,TBL_TrangThaiThietBiEntity objCond)
        { 
            return (TBL_TrangThaiThietBiEntity)Adapter.UpdateWithCondition(obj,objCond);             
        }
 
 
        public TBL_TrangThaiThietBiEntity Delete(TBL_TrangThaiThietBiEntity obj)
        { 
            return (TBL_TrangThaiThietBiEntity)Adapter.Delete(obj);             
        }
 
 
        public TBL_TrangThaiThietBiEntity DeleteWithCondition(TBL_TrangThaiThietBiEntity objCond)
        { 
            return (TBL_TrangThaiThietBiEntity)Adapter.DeleteWithCondition(objCond);             
        }
 


        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien MaTTTB duoc set trong object
        /// </summary>
        /// <returns>TBL_TrangThaiThietBiEntity</returns>
        public TBL_TrangThaiThietBiEntity DeleteByMaTTTB (TBL_TrangThaiThietBiEntity obj)
        { 
            return (TBL_TrangThaiThietBiEntity)Adapter.DeleteByField(obj,"MaTTTB");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien MaTTTB 
        /// </summary>
        /// <returns>TBL_TrangThaiThietBiEntity</returns>
        public TBL_TrangThaiThietBiEntity DeleteByMaTTTB (string MaTTTB )
        { 
            TBL_TrangThaiThietBiEntity obj = new TBL_TrangThaiThietBiEntity();
            obj.MaTTTB = MaTTTB;  
            return (TBL_TrangThaiThietBiEntity)Adapter.DeleteByField(obj,"MaTTTB");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien MotaTTTB duoc set trong object
        /// </summary>
        /// <returns>TBL_TrangThaiThietBiEntity</returns>
        public TBL_TrangThaiThietBiEntity DeleteByMotaTTTB (TBL_TrangThaiThietBiEntity obj)
        { 
            return (TBL_TrangThaiThietBiEntity)Adapter.DeleteByField(obj,"MotaTTTB");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien MotaTTTB 
        /// </summary>
        /// <returns>TBL_TrangThaiThietBiEntity</returns>
        public TBL_TrangThaiThietBiEntity DeleteByMotaTTTB (string MotaTTTB )
        { 
            TBL_TrangThaiThietBiEntity obj = new TBL_TrangThaiThietBiEntity();
            obj.MotaTTTB = MotaTTTB;  
            return (TBL_TrangThaiThietBiEntity)Adapter.DeleteByField(obj,"MotaTTTB");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien TenTTTB duoc set trong object
        /// </summary>
        /// <returns>TBL_TrangThaiThietBiEntity</returns>
        public TBL_TrangThaiThietBiEntity DeleteByTenTTTB (TBL_TrangThaiThietBiEntity obj)
        { 
            return (TBL_TrangThaiThietBiEntity)Adapter.DeleteByField(obj,"TenTTTB");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien TenTTTB 
        /// </summary>
        /// <returns>TBL_TrangThaiThietBiEntity</returns>
        public TBL_TrangThaiThietBiEntity DeleteByTenTTTB (string TenTTTB )
        { 
            TBL_TrangThaiThietBiEntity obj = new TBL_TrangThaiThietBiEntity();
            obj.TenTTTB = TenTTTB;  
            return (TBL_TrangThaiThietBiEntity)Adapter.DeleteByField(obj,"TenTTTB");
        }

 
        /// <summary>
        /// Lay du lieu theo khoa chinh object
        /// </summary>
        /// <returns></returns>
        public TBL_TrangThaiThietBiEntity Select(TBL_TrangThaiThietBiEntity obj)
        { 
            return (TBL_TrangThaiThietBiEntity) Adapter.Select(obj);             
        }
 
 
        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns></returns>
        public DataTable SelectWithCondition(TBL_TrangThaiThietBiEntity obj)
        { 
            return  Adapter.SelectWithCondition(obj);             
        }
 
 
        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns></returns>
        public DataTable SelectWithCondition(TBL_TrangThaiThietBiEntity obj,SelectOptions option)
        {             
            return  Adapter.SelectWithCondition(obj,option);             
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public DataTable SelectAll()
        { 
            return Adapter.SelectAll(new TBL_TrangThaiThietBiEntity());             
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public DataTable SelectAll(SelectOptions option)
        { 
            return Adapter.SelectAll(new TBL_TrangThaiThietBiEntity(),option);             
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public List<TBL_TrangThaiThietBiEntity> SelectAllLST()
        { 
            return  (List<TBL_TrangThaiThietBiEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectAll(new TBL_TrangThaiThietBiEntity()),new TBL_TrangThaiThietBiEntity());           
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public List<TBL_TrangThaiThietBiEntity> SelectAllLST(SelectOptions option)
        { 
            return (List<TBL_TrangThaiThietBiEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectAll(new TBL_TrangThaiThietBiEntity(),option),new TBL_TrangThaiThietBiEntity());             
        }
 

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaTTTB duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMaTTTB (TBL_TrangThaiThietBiEntity obj)
        { 
            return Adapter.SelectByField(obj,"MaTTTB");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaTTTB duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMaTTTB (TBL_TrangThaiThietBiEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"MaTTTB",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaTTTB duoc set trong object
        /// </summary>
        /// <returns>List<TBL_TrangThaiThietBiEntity></returns>
        public List<TBL_TrangThaiThietBiEntity> SelectByMaTTTBLST (TBL_TrangThaiThietBiEntity obj)
        { 
            return  (List<TBL_TrangThaiThietBiEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"MaTTTB"),new TBL_TrangThaiThietBiEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaTTTB duoc set trong object
        /// </summary>
        /// <returns>List<TBL_TrangThaiThietBiEntity></returns>
        public List<TBL_TrangThaiThietBiEntity> SelectByMaTTTBLST (TBL_TrangThaiThietBiEntity obj,SelectOptions option)
        { 
            return  (List<TBL_TrangThaiThietBiEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"MaTTTB",option),new TBL_TrangThaiThietBiEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaTTTB 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMaTTTB (string MaTTTB )
        { 
            TBL_TrangThaiThietBiEntity obj = new TBL_TrangThaiThietBiEntity();
            obj.MaTTTB = MaTTTB;  
            return Adapter.SelectByField(obj,"MaTTTB");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaTTTB duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMaTTTB (string MaTTTB, SelectOptions option)
        { 
            TBL_TrangThaiThietBiEntity obj = new TBL_TrangThaiThietBiEntity();
            obj.MaTTTB = MaTTTB;  
            return Adapter.SelectByField(obj,"MaTTTB",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaTTTB 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_TrangThaiThietBiEntity> SelectByMaTTTBLST (string MaTTTB )
        { 
            TBL_TrangThaiThietBiEntity obj = new TBL_TrangThaiThietBiEntity();
            obj.MaTTTB = MaTTTB;  
            return  (List<TBL_TrangThaiThietBiEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"MaTTTB"),new TBL_TrangThaiThietBiEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaTTTB duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_TrangThaiThietBiEntity> SelectByMaTTTBLST (string MaTTTB, SelectOptions option)
        { 
            TBL_TrangThaiThietBiEntity obj = new TBL_TrangThaiThietBiEntity();
            obj.MaTTTB = MaTTTB;  
            return  (List<TBL_TrangThaiThietBiEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"MaTTTB",option),new TBL_TrangThaiThietBiEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MotaTTTB duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMotaTTTB (TBL_TrangThaiThietBiEntity obj)
        { 
            return Adapter.SelectByField(obj,"MotaTTTB");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MotaTTTB duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMotaTTTB (TBL_TrangThaiThietBiEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"MotaTTTB",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MotaTTTB duoc set trong object
        /// </summary>
        /// <returns>List<TBL_TrangThaiThietBiEntity></returns>
        public List<TBL_TrangThaiThietBiEntity> SelectByMotaTTTBLST (TBL_TrangThaiThietBiEntity obj)
        { 
            return  (List<TBL_TrangThaiThietBiEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"MotaTTTB"),new TBL_TrangThaiThietBiEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MotaTTTB duoc set trong object
        /// </summary>
        /// <returns>List<TBL_TrangThaiThietBiEntity></returns>
        public List<TBL_TrangThaiThietBiEntity> SelectByMotaTTTBLST (TBL_TrangThaiThietBiEntity obj,SelectOptions option)
        { 
            return  (List<TBL_TrangThaiThietBiEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"MotaTTTB",option),new TBL_TrangThaiThietBiEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MotaTTTB 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMotaTTTB (string MotaTTTB )
        { 
            TBL_TrangThaiThietBiEntity obj = new TBL_TrangThaiThietBiEntity();
            obj.MotaTTTB = MotaTTTB;  
            return Adapter.SelectByField(obj,"MotaTTTB");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MotaTTTB duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMotaTTTB (string MotaTTTB, SelectOptions option)
        { 
            TBL_TrangThaiThietBiEntity obj = new TBL_TrangThaiThietBiEntity();
            obj.MotaTTTB = MotaTTTB;  
            return Adapter.SelectByField(obj,"MotaTTTB",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MotaTTTB 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_TrangThaiThietBiEntity> SelectByMotaTTTBLST (string MotaTTTB )
        { 
            TBL_TrangThaiThietBiEntity obj = new TBL_TrangThaiThietBiEntity();
            obj.MotaTTTB = MotaTTTB;  
            return  (List<TBL_TrangThaiThietBiEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"MotaTTTB"),new TBL_TrangThaiThietBiEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MotaTTTB duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_TrangThaiThietBiEntity> SelectByMotaTTTBLST (string MotaTTTB, SelectOptions option)
        { 
            TBL_TrangThaiThietBiEntity obj = new TBL_TrangThaiThietBiEntity();
            obj.MotaTTTB = MotaTTTB;  
            return  (List<TBL_TrangThaiThietBiEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"MotaTTTB",option),new TBL_TrangThaiThietBiEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien TenTTTB duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByTenTTTB (TBL_TrangThaiThietBiEntity obj)
        { 
            return Adapter.SelectByField(obj,"TenTTTB");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien TenTTTB duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByTenTTTB (TBL_TrangThaiThietBiEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"TenTTTB",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien TenTTTB duoc set trong object
        /// </summary>
        /// <returns>List<TBL_TrangThaiThietBiEntity></returns>
        public List<TBL_TrangThaiThietBiEntity> SelectByTenTTTBLST (TBL_TrangThaiThietBiEntity obj)
        { 
            return  (List<TBL_TrangThaiThietBiEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"TenTTTB"),new TBL_TrangThaiThietBiEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien TenTTTB duoc set trong object
        /// </summary>
        /// <returns>List<TBL_TrangThaiThietBiEntity></returns>
        public List<TBL_TrangThaiThietBiEntity> SelectByTenTTTBLST (TBL_TrangThaiThietBiEntity obj,SelectOptions option)
        { 
            return  (List<TBL_TrangThaiThietBiEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"TenTTTB",option),new TBL_TrangThaiThietBiEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien TenTTTB 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByTenTTTB (string TenTTTB )
        { 
            TBL_TrangThaiThietBiEntity obj = new TBL_TrangThaiThietBiEntity();
            obj.TenTTTB = TenTTTB;  
            return Adapter.SelectByField(obj,"TenTTTB");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien TenTTTB duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByTenTTTB (string TenTTTB, SelectOptions option)
        { 
            TBL_TrangThaiThietBiEntity obj = new TBL_TrangThaiThietBiEntity();
            obj.TenTTTB = TenTTTB;  
            return Adapter.SelectByField(obj,"TenTTTB",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien TenTTTB 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_TrangThaiThietBiEntity> SelectByTenTTTBLST (string TenTTTB )
        { 
            TBL_TrangThaiThietBiEntity obj = new TBL_TrangThaiThietBiEntity();
            obj.TenTTTB = TenTTTB;  
            return  (List<TBL_TrangThaiThietBiEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"TenTTTB"),new TBL_TrangThaiThietBiEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien TenTTTB duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_TrangThaiThietBiEntity> SelectByTenTTTBLST (string TenTTTB, SelectOptions option)
        { 
            TBL_TrangThaiThietBiEntity obj = new TBL_TrangThaiThietBiEntity();
            obj.TenTTTB = TenTTTB;  
            return  (List<TBL_TrangThaiThietBiEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"TenTTTB",option),new TBL_TrangThaiThietBiEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns>List<TBL_TrangThaiThietBiEntity></returns>
        public List<TBL_TrangThaiThietBiEntity> SelectWithConditionLST (TBL_TrangThaiThietBiEntity obj)
        { 
            return  (List<TBL_TrangThaiThietBiEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectWithCondition(obj),new TBL_TrangThaiThietBiEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns>List<TBL_TrangThaiThietBiEntity></returns>
        public List<TBL_TrangThaiThietBiEntity> SelectWithConditionLST (TBL_TrangThaiThietBiEntity obj,SelectOptions option)
        { 
            return  (List<TBL_TrangThaiThietBiEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectWithCondition(obj,option),new TBL_TrangThaiThietBiEntity());
        }

}
}
